package com.haitonghop.data;

import java.util.ArrayList;

public class RssEntryDataObject {
	private int id = -1;
	private String name = "";
	private String link = "";
	private ArrayList<Entry> entries;
	
	public RssEntryDataObject() {
		entries = new ArrayList<Entry>();
	}
	
	public RssEntryDataObject(int id, String name, String link){
		this.id = id;
		this.name = name;
		this.link = link;
		entries = new ArrayList<Entry>();
	}
	
	public void addEntry(Entry entry){
		if(entry != null)
			entries.add(entry);
	}
	
	public ArrayList<Entry> getAllEntry(){
		return this.entries;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getLink() {
		return link;
	}
	
	public void setLink(String link) {
		this.link = link;
	}
	
	public static class Entry {
		private String title = "";
		private String img = "";
		private String link = "";
		private String dateTime = "";
	
		public Entry() {
			// TODO Auto-generated constructor stub
		}
		
		public Entry(String title, String img, String link, String dateTime){
			this.title = title;
			this.img = img;
			this.link = link;
			this.dateTime = dateTime;
		}
		
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
		public String getImg() {
			return img;
		}
		public void setImg(String img) {
			this.img = img;
		}
		public String getLink() {
			return link;
		}
		public void setLink(String link) {
			this.link = link;
		}
		public String getDateTime() {
			return dateTime;
		}
		public void setDateTime(String dateTime) {
			this.dateTime = dateTime;
		}
	}
	
}
